class DownloadGroup2(object):
	def __init__(self, downloads, updateprogress = None):
		self.downloads = []
		self.downloads = downloads
		self.updateprogress = updateprogress
		
	def start(self):
		totalbytes = 0
		for download in self.downloads:
			if download.file:
				totalbytes += download.totalbytes
		
		bytesread = 0
		if self.updateprogress:
			self.updateprogress(totalbytes, bytesread) #setting the amount of the gauge
		for download in self.downloads:
			if download.file:
				downloadfile = open(download.localFile, 'wb')			
				for line in download.file:
					bytesread += len(line)
					downloadfile.write(line)
					if self.updateprogress:
						self.updateprogress(totalbytes, bytesread)
				
				download.file.close()
				downloadfile.close()